﻿<UserControl x:Class="ContactTracing.CaseView.Controls.Occupations"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:p="clr-namespace:ContactTracing.CaseView.Properties"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="700">
    <Grid>
        <Grid.Background>
            <SolidColorBrush Color="Black" Opacity="0.4" />
        </Grid.Background>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="1" BorderBrush="{StaticResource HighlightBrush}">
            <Grid Width="Auto" Height="Auto" Background="{StaticResource LightBackgroundBrush}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <StackPanel Margin="20">

                    <Rectangle HorizontalAlignment="Left" Width="100" Height="6" Fill="{StaticResource AccentBrush}" />
                    
                    <TextBlock Style="{StaticResource Heading1}">OCCUPATIONS</TextBlock>
                    
                    <StackPanel Height="20" />

                    <WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="500">
                        <WrapPanel.Resources>
                            <Style TargetType="CheckBox">
                                <Setter Property="Margin" Value="0, 4, 4, 2" />
                                <Setter Property="VerticalAlignment" Value="Center" />
                            </Style>

                            <Style TargetType="TextBox">
                                <Setter Property="Margin" Value="2, 4, 4, 4" />
                                <Setter Property="HorizontalAlignment" Value="Center" />
                                <Setter Property="VerticalAlignment" Value="Center" />
                            </Style>

                            <Style TargetType="TextBlock">
                                <Setter Property="Margin" Value="2, 4, 4, 2" />
                                <Setter Property="VerticalAlignment" Value="Center" />
                            </Style>
                        </WrapPanel.Resources>
                        <CheckBox x:Name="checkboxFarmer" Content="{x:Static p:Resources.PrintedFormFarmer}"
                                    IsChecked="{Binding OccupationFarmer,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxButcher" Content="{x:Static p:Resources.PrintedFormButcher}" 
                                    IsChecked="{Binding OccupationButcher,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxHunter" Content="{x:Static p:Resources.PrintedFormHunter}" 
                                    IsChecked="{Binding OccupationHunter,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxMiner" Content="{x:Static p:Resources.PrintedFormMiner}" 
                                    IsChecked="{Binding OccupationMiner,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxReligious" Content="{x:Static p:Resources.PrintedFormReligious}" 
                                    IsChecked="{Binding OccupationReligious,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxHousewife" Content="{x:Static p:Resources.PrintedFormHousewife}" 
                                    IsChecked="{Binding OccupationHousewife,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxStudent" Content="{x:Static p:Resources.PrintedFormStudent}"
                                    IsChecked="{Binding OccupationStudent,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <CheckBox x:Name="checkboxChild" Content="{x:Static p:Resources.PrintedFormChild}"
                                    IsChecked="{Binding OccupationChild,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        <StackPanel Orientation="Horizontal" Margin="0, 0, 0, -2">
                            <CheckBox x:Name="checkboxBusinessman" Content="{x:Static p:Resources.PrintedFormBusinessman}" 
                                    IsChecked="{Binding OccupationBusinessman,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <TextBlock Text="{x:Static p:Resources.PrintedFormTypeBusiness}" />
                            <TextBox x:Name="txtBusinessType"  Width="180" IsEnabled="{Binding ElementName=checkboxBusinessman, Path=IsChecked}" 
                                    Text="{Binding OccupationBusinessSpecify, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Margin="0, 0, 0, 0">
                            <CheckBox x:Name="checkboxTransporter" Content="{x:Static p:Resources.PrintedFormTransporter}" 
                                    IsChecked="{Binding OccupationTransporter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <TextBlock Text="{x:Static p:Resources.PrintedFormTypeTransport}" />
                            <TextBox x:Name="txtTransportType"  Width="180"  IsEnabled="{Binding ElementName=checkboxTransporter, Path=IsChecked}"
                                    Text="{Binding OccupationTransporterSpecify, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>

                        <!--<StackPanel Orientation="Horizontal" Margin="0, 0, 0, 0">
                            <CheckBox VerticalAlignment="Center" x:Name="checkboxHCW" Content="{x:Static p:Resources.PrintedFormHCW}"
                                    
                                    IsChecked="{Binding IsHCW, UpdateSourceTrigger=PropertyChanged}" />
                            <TextBlock Text="{x:Static p:Resources.PrintedFormHCWPosition}" />
                            <TextBox x:Name="txtHCWPosition"  Width="180" IsEnabled="{Binding ElementName=checkboxHCW, Path=IsChecked}"
                                    
                                    Text="{Binding OccupationHCWPosition, UpdateSourceTrigger=PropertyChanged}" />
                            <TextBlock Text="{x:Static p:Resources.PrintedFormHCWFacility}" />
                            <TextBox x:Name="txtHCWFacility"  IsEnabled="{Binding ElementName=checkboxHCW, Path=IsChecked}" Width="180"
                                    
                                    Text="{Binding OccupationHCWFacility, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>-->

                        <CheckBox x:Name="checkboxTradHealer" Content="{x:Static p:Resources.PrintedFormTraditionalHealer}" 
                                    IsChecked="{Binding OccupationTraditionalHealer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                        <StackPanel Orientation="Horizontal" Margin="0, 0, 0, -2">
                            <CheckBox x:Name="checkboxOther" Content="{x:Static p:Resources.PrintedFormOccupationOther}" 
                                    IsChecked="{Binding OccupationOther, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                            <TextBlock Text="{x:Static p:Resources.PrintedFormOccupationOtherSpecify}" />
                            <TextBox x:Name="txtOtherOccupationSpecify"  IsEnabled="{Binding ElementName=checkboxOther, Path=IsChecked}" Width="190" 
                                    Text="{Binding OccupationOtherSpecify, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>

                    </WrapPanel>

                    <StackPanel Height="20" />

                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                        <Button
                                    Content="Close"
                                    Command="{Binding ToggleOccupationsDisplayCommand}"
                                    Width="90" Margin="0, 0, 0, 0" />
                    </StackPanel>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>
